package com.jdplat.jdm.web.service.system.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.jdplat.jdm.core.web.service.impl.BaseServiceImpl;
import com.jdplat.jdm.web.service.system.ISystemPermissionService;
/**
 * 
 * @author qirp
 *
 */
@Service
public class SystemPermissionServiceImpl extends BaseServiceImpl implements ISystemPermissionService{

	@Override
	public List<Map<String, Object>> permissionList(String currentUserId) {
		List<Map<String, Object>> permissionList = getDao().queryForList("systemPermission_space.permissionList", currentUserId);
		if(permissionList.size() > 0){
			return permissionList;
		}else
		    return null;
	}

	public List<Map<String, Object>> getUserPermission(String roleId) {
		List<Map<String, Object>> userPermission = getDao().queryForList("systemPermission_space.getUserPermission", roleId);
		if(userPermission.size() > 0){
			return userPermission;
		}else
		    return null;
	}

}
